-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing and handle role change during role init #22112
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pon Assigning and Releasing
heesung-sn
force-pushed
the
update-getOwnerAsync
branch
from
February 24, 2024 17:52
ad14014
to
94c5af1
Compare
heesung-sn
force-pushed
the
update-getOwnerAsync
branch
from
February 24, 2024 17:57
94c5af1
to
cabc1b7
Compare
...ava/org/apache/pulsar/broker/loadbalance/extensions/channel/ServiceUnitStateChannelImpl.java
Show resolved
Hide resolved
heesung-sn
force-pushed
the
update-getOwnerAsync
branch
from
February 26, 2024 21:45
1fd1922
to
c477ee6
Compare
heesung-sn
commented
Feb 26, 2024
...src/test/java/org/apache/pulsar/tests/integration/loadbalance/ExtensibleLoadManagerTest.java
Show resolved
Hide resolved
heesung-sn
changed the title
[fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing
[fix][broker] Return getOwnerAsync without waiting on source broker upon Assigning and Releasing and handle role change during role init
Feb 27, 2024
Technoboy-
approved these changes
Feb 27, 2024
Demogorgon314
approved these changes
Feb 28, 2024
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Feb 29, 2024
…pon Assigning and Releasing and handle role change during role init (apache#22112) (cherry picked from commit 56eb758)
heesung-sn
added a commit
to heesung-sn/pulsar
that referenced
this pull request
Feb 29, 2024
…pon Assigning and Releasing and handle role change during role init (apache#22112) (cherry picked from commit 56eb758)
mukesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 1, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (apache#22112) (apache#22156) (cherry picked from commit b3b1bfb) (cherry picked from commit 58a45aa)
mukesh-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Mar 6, 2024
…rce broker upon Assigning and Releasing and handle role change during role init (apache#22112) (apache#22156) (cherry picked from commit b3b1bfb) (cherry picked from commit 58a45aa)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-picked/branch-3.0
cherry-picked/branch-3.1
cherry-picked/branch-3.2
doc-not-needed
Your PR changes do not impact docs
ready-to-test
release/3.0.3
release/3.1.3
release/3.2.1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Upon Assigning and Releasing, if this broker is not the dst broker, return the dst broker as the owner(or empty). Clients need to connect(redirect) to the dst broker anyway and wait for the dst broker to receive
Owned
. This is also required to return getOwnerAsync on the src broker immediately during unloading. Otherwise, topic creation(getOwnerAsync) could block unloading bundles, if the topic creation(getOwnerAsync) happens during unloading on the src broker.Found a case that the broker role might change in the middle while running playLeader or playFollower. In this case, we need to break the init loop and restart playLeader or playFollower according to the current role.
Modifications
Verifying this change
This change added tests.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: heesung-sn#63